﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TreaShares.Algo
{
    public class VanillaPricer
    {
        public int Add(int x, int y) { return x + y; }
        public void PriceOptionEuro(DateTime valueDate, DateTime maturity, double underlying, double strike, double riskFreeRate, double dividendYield, double volatility, ref double NPV, ref double delta, ref double gamma, ref double theta)
        {
            TreasAlgo.MVanillaOptionPricer pricer = new TreasAlgo.MVanillaOptionPricer();
            pricer.priceOptionEuro(valueDate, maturity, underlying, strike, riskFreeRate, dividendYield, volatility, ref NPV, ref delta, ref gamma, ref theta);
        }

        public void PriceOptionAmer(DateTime valueDate, DateTime maturity, double underlying, double strike, double riskFreeRate, double dividendYield, double volatility, ref double NPV, ref double delta, ref double gamma)
        {
            TreasAlgo.MVanillaOptionPricer pricer = new TreasAlgo.MVanillaOptionPricer();
            pricer.priceOptionAmer(valueDate, maturity, underlying, strike, riskFreeRate, dividendYield, volatility, ref NPV, ref delta, ref gamma);
        }

        public void PriceOptionEmp(DateTime valueDate, DateTime maturity,DateTime vestingDate, double underlying, double strike, double riskFreeRate, double dividendYield,double empLossRate, double volatility, ref double NPV, ref double delta, ref double gamma, ref double theta)
        {
            TreasAlgo.MVanillaEmpOptionPricer pricer = new TreasAlgo.MVanillaEmpOptionPricer();
            pricer.priceOption(valueDate, maturity,vestingDate, underlying, strike, riskFreeRate, dividendYield,empLossRate, volatility, ref NPV, ref delta, ref gamma, ref theta);
        }
    }
}
